package com.cwt_taxi_xa.model;

import com.cwt_taxi_xa.util.DateUtil;

import java.io.Serializable;

/**
 * 问题下发
 * @author wlh
 *
 */
public class QuestionInfo implements Serializable{

	public QuestionInfo() {
		super();
		setCreatTime(DateUtil.getNowDate());
		setIsDone(0);
		setIsRead(0);
	}

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/**id*/
	private int id;

	/**
	 * 标识
	 * 0	1：紧急
	 * 1	预留
	 * 2	预留
	 * 3	1:终端语音合成（TTS)播读
	 * 4	1:广告屏显示
	 * 5--7	预留
	 * */
	private String flag;

	/**创建时间*/
	private String creatTime;

	private int serialId;

	/**是否已读
	 * 0：未读	1：已读
	 * */
	private int isRead;

	/**是否已经应答
	 * 0：否	1：是
	 * */
	private int isDone;

	/**
	 * 已选答案id
	 * */
	private int answerId;

	/**问题内容*/
	private String text;

	/**
	 * 答案
	 * 格式：答案1id,答案1;答案2id,答案2;答案3id,答案3;答案4id,答案4
	 */
	private String answer = "";

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getIsDone() {
		return isDone;
	}
	public void setIsDone(int isDone) {
		this.isDone = isDone;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getAnswer() {
		return answer;
	}
	/**
	 * 设置答案
	 * @param answerId	答案id
	 * @param answer	答案
	 */
	public void setAnswer(int answerId, String answer) {
		this.answer += (""+ answerId + "," + answer + ";");
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public String getFlag() {
		return flag;
	}
	public void setFlag(String flag) {
		this.flag = flag;
	}
	public String getCreatTime() {
		return creatTime;
	}
	public void setCreatTime(String creatTime) {
		this.creatTime = creatTime;
	}
	public int getIsRead() {
		return isRead;
	}
	public void setIsRead(int isRead) {
		this.isRead = isRead;
	}
	public int getAnswerId() {
		return answerId;
	}
	public void setAnswerId(int answerId) {
		this.answerId = answerId;
	}
	public int getSerialId() {
		return serialId;
	}
	public void setSerialId(int serialId) {
		this.serialId = serialId;
	}
}
